<%--
  Created by IntelliJ IDEA.
  User: windows
  Date: 2021/11/6
  Time: 12:03
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script src="${pageContext.request.contextPath}/js/jquery-3.6.0.js"></script>
</head>
<body>
<form action="detail.jsp">
    <label for="id"></label><input type="text" name="id" id="id">
</form>
<script>
    $(document).ready(function () {
        let id = sessionStorage.getItem("id")
        console.log("id: " + id)
        $("#id").attr("value", id)
        console.log("val: " + $("#id").attr("value"))
        $("form").submit()
    })
</script>
</body>
</html>
